package com.dianda.service;

import com.dianda.dao.ClassmateDao;
import com.dianda.pojo.Classmate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ClassmateService {
    @Autowired
    ClassmateDao dao;

    //查询所有学生信息
    public List<Classmate> getClassmateList(){
        return dao.findAll();
    }

    public Classmate findById(Integer id) {
        return dao.getById(id);
    }
}
